home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Varsity Update 1998 August
/
SGI Varsity Update 1998 August.iso
/
dist
/
dist6.5
/
il_dev.idb
/
usr
/
include
/
il
/
ilPolyWarpImg.h.z
/
ilPolyWarpImg.h
Wrap
C/C++ Source or Header
|
1998-07-29
|
3KB
|
87 lines
#if 0
Copyright (c) 1991 SGI All Rights Reserved
THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI
The copyright notice above does not evidence any
actual or intended publication of such source code,
and is an unpublished work by Silicon Graphics, Inc.
This material contains CONFIDENTIAL INFORMATION that
is the property of Silicon Graphics, Inc. Any use,
duplication or disclosure not specifically authorized
by Silicon Graphics is strictly prohibited.
RESTRICTED RIGHTS LEGEND:
Use, duplication or disclosure by the Government is
subject to restrictions as set forth in subdivision
(c)(1)(ii) of the Rights in Technical Data and Computer
Software clause at DFARS 52.227-7013, and/or in similar
or successor clauses in the FAR, DOD or NASA FAR
Supplement. Unpublished- rights reserved under the
Copyright Laws of the United States. Contractor is
SILICON GRAPHICS, INC., 2011 N. Shoreline Blvd.,
Mountain View, CA 94039-7311
#endif
/*
ilPolyWarp is derived from ilWarpImg. It mainly exists for backwards
compatibility. You can accomplish the same thing by passing an
ilPolyWarp to ilWarpImg directly.
*/
#ifndef _ilPolyWarpImg_h_
#define _ilPolyWarpImg_h_
#include <il/ilWarpImg.h>
#include <ifl/iflCoord.h>
#include <il/ilPolyDef.h>
#include <il/ilPolyWarp.h>
#include <il/ilError.h>
#include <assert.h>
class ilPolyWarpImg : public ilWarpImg {
public:
iflClassListDeclare
~ilPolyWarpImg()
{ delete pwarp; }
// external api: begin
ilPolyWarpImg(ilImage* img = NULL, ilResampType rs=ilNearNb) : ilWarpImg(img, rs)
{ pwarp = new ilPolyWarp(); ilWarpImg::setWarp((ilWarp*)pwarp); }
ilStatus setWarp(const ilPolyWarp &Xyc)
{
pwarp->init(Xyc.getCoeffX(), Xyc.getCoeffY());
ilWarpImg::setWarp((ilWarp*)pwarp);
return ilOKAY;
}
// external api: name=setWarpCoeff
ilStatus setWarp(const ilPoly2D& xc, const ilPoly2D& yc)
{ pwarp->init(xc, yc); ilWarpImg::setWarp((ilWarp*)pwarp); return ilOKAY; }
void getWarp(ilPolyWarp &Xyc) const
{ Xyc.init(pwarp->getCoeffX(), pwarp->getCoeffY()); }
// external api: name=getWarpCoeff
void getWarp(ilPoly2D& xc, ilPoly2D& yc) const
{ xc = pwarp->getCoeffX(); yc = pwarp->getCoeffY(); }
int getWarpDegree() const
{
assert(pwarp->getCoeffX().degree == pwarp->getCoeffY().degree);
return pwarp->getCoeffX().degree;
}
// external api: end
#if defined(IL2_5_COMPAT)
ilStatus setCoeff(const ilPoly2D& xc, const ilPoly2D& yc)
{ return setWarp(xc, yc); }
void getCoeff(ilPoly2D& xc, ilPoly2D& yc) const { getWarp(xc, yc); }
int getPolyOrder() const { return getWarpDegree(); }
#endif
private:
ilPolyWarp* pwarp;
};
#endif